package ace.cmp.spring.data.jdbc.test.config;

import org.springframework.context.annotation.Configuration;
import org.springframework.data.jdbc.repository.config.AbstractJdbcConfiguration;
import org.springframework.data.jdbc.repository.config.EnableJdbcRepositories;

/**
 * @author caspar
 * @date 2023/2/14 11:46
 */
@EnableJdbcRepositories
@Configuration
public class DataTestConfig extends AbstractJdbcConfiguration {

  //    @Bean
  //    public PlatformTransactionManager transactionManager(DataSource dataSource) {
  //        return new DataSourceTransactionManager(dataSource);
  //    }
  //
  //    @Bean
  //    public com.querydsl.sql.Configuration querydslConfiguration() {
  //        SQLTemplates templates = H2Templates.builder().build(); //change to your Templates
  //        com.querydsl.sql.Configuration configuration = new
  // com.querydsl.sql.Configuration(templates);
  //        configuration.setExceptionTranslator(new SpringExceptionTranslator());
  //        return configuration;
  //    }
  //
  //    @Bean
  //    public SQLQueryFactory queryFactory(DataSource dataSource, com.querydsl.sql.Configuration
  // configuration) {
  //        SpringConnectionProvider provider = new SpringConnectionProvider(dataSource);
  //        return new SQLQueryFactory(configuration, provider);
  //    }
}
